//
//  SyncDatamanager.m
//  Runner
//
//  Created by huimac on 2021/10/27.
//

#import "SynchronousDataPlugin.h"
#import "SyncDatamanager.h"

@implementation SyncDatamanager
static SyncDataModel *model1;
static SyncDataModel *model2;

+(void)startHandleSyncDatas {
    [SynchronousDataPlugin registSynchronousData:@"uuid_test_model1" handler:^BaseSynchronousData *(NSString *uuid, NSDictionary *data) {
        model1 = [[[SyncDataModel alloc] init] toObject:data];
        return model1;
    }];
    
    [SynchronousDataPlugin registSynchronousData:@"uuid_test_model2" handler:^BaseSynchronousData *(NSString *uuid, NSDictionary *data) {
        model2 = [[[SyncDataModel alloc] init] toObject:data];
        return model2;
    }];
}

+(SyncDataModel *)getModel1 {
    return model1;
}

+(SyncDataModel *)getModel2 {
    return model2;
}

@end
